/// <reference path="hello.tsx" />
/// <reference path="greeter.tsx" />
$(() => {

    ReactDOM.render(
        <View.Comment author="yanhaijang" />,
        document.getElementById("do1")
    );

    let data = [
        { id: 1, author: "yan", text: "mmmm" },
        { id: 2, author: "niao", text: "eeee" }]
    ReactDOM.render(
        <View.CommentList data={data} />,
        document.getElementById("do2")
    );

    let f = function (author: "yan", text: "form") {
        alert("test");
    }
    ReactDOM.render(
        <View.CommentForm onCommentSubmit={f} />,
        document.getElementById("do3")
    );

    var data1 = [
        { id: 1, author: "Pete Hunt", text: "This is one comment" },
        { id: 2, author: "Jordan Walke", text: "This is *another* comment" }
    ];
    ReactDOM.render(<View.CommentBox data={data1} url='comments.json' pollInterval={60000} />,
        document.getElementById("do4")
    );

    
    let arr = [
        { name: "yyyy", relation: "222", phone: "18310765654" },
        { name: "rrrr", relation: "333", phone: "18310765654" }];
    ReactDOM.render(<GreeterN.ContactList data={arr} />,
        document.getElementById("do5")
    );
})